package com.sihan.framework.etm.common;

import java.util.HashMap;
import java.util.Map;

public class CacheOperatorInfo {

	//缓存数据
	protected final static Map<String,Object> cacheMap = new HashMap<String,Object>();
	
	protected static final String TOOL_CODE_READ_FLAG_SCRAP = "1";//报废的读取
	public static final String TOOL_CODE_READ_FLAG_ADD_NEW = "2";//增量入库的读取
	public static final String TOOL_CODE_READ_FLAG_UPDATE = "3";//修改工器具读取

	public static Object getMapValue(String param,Object defaultValue) {
		Object value = cacheMap.get(param);
		if(null != value && !"".equals(value)) {
			return value;
		}
		return defaultValue;
	}

	public static void setMapValue(String param,Object value) {
		cacheMap.put(param, value);
	}

	public static void flushCashMap() {
		cacheMap.clear();
	}
}
